<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
  <meta name="description" content="">
  <meta name="author" content="ThemeBucket">
  <link rel="shortcut icon" href="#" type="image/png">

  <title>用户列表</title>
    <link rel="stylesheet" th:href="@{https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css}">
    <script th:src="@{https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js}"></script>



    <div th:include="common :: commonheader"></div>
</head>

<body class="sticky-header">


<section>
    <!-- 左边开始-->
    <div th:replace="common :: leftmenu"></div>
    <!-- 左边结束-->

    <!--主要内容开始-->
    <div class="main-content" >
        <!-- 头部分开始-->
        <div th:replace="common :: headermenu"></div>
        <!-- 头部分结束-->
        <!-- 页面标题开始-->
        <div class="page-heading">
            <h3>
                图书信息
            </h3>
            <ul class="breadcrumb">
                <li>
                    <a href="#">精选图书</a>
                </li>
                <li>
                    <a href="#">推荐图书</a>
                </li>
                <li class="active"><a href="#">特价图书</a></li>
            </ul>
        </div>
        <!-- 页面标题结束 -->

        <!--身体包装员开始-->
        <div class="wrapper">
             <div class="row">
                <div class="col-sm-12">
                <section class="panel">
                <header class="panel-heading">
                    用户信息
                    <span class="tools pull-right">
                        <a href="javascript:;" class="fa fa-chevron-down"></a>
                         <!--    删除键    -->
<!--                        <a href="javascript:;" class="fa fa-times"></a>-->
                     </span>
                </header>
                <div class="panel-body">
                <div class="adv-table editable-table ">


                <div class="space15"></div>



                    <!--加载数据-->
                    <div id="admin1"></div>

                </div>
                </div>
                </section>
                </div>
                </div>
        </div>



        <!--身体包装端结束-->

        <!--footer section start-->
        <footer>
            2021 &copy; 后台管理
        </footer>
        <!--footer section end-->


    </div>
    <!-- main content end-->
</section>
<div th:replace="common :: adminname1"></div>
<!-- 最后把js文件的页面加载速度 -->
<div th:replace="common :: commonscript"></div>

<!--data table-->
<script type="text/javascript" src="js/data-tables/jquery.dataTables.js"></script>
<script type="text/javascript" src="js/data-tables/DT_bootstrap.js"></script>




<!--script for editable table-->
<script src="js/editable-table.js"></script>

<!-- END JAVASCRIPTS -->
<script>
    jQuery(document).ready(function() {
        EditableTable.init();
    });
</script>
<script th:inline="javascript">
    //获取应用路径
    var contextPath = [[${#request.getContextPath()}]];



</script>
<script type="text/javascript">

    $(function () {
        $("#admin1").load(contextPath + "/getadminData",buildQuery(1,5));
    })



    //加载其他页数据
    function loadData(page,size) {

        $("#admin1").load(contextPath + "/getadminData",buildQuery(page,size));

    }
    function adminname(page,size) {
        var adminname =  document.getElementById("adminname").value;

        $("#admin1").load(contextPath + "/getUserNameData?adminname="+adminname,buildQuer(page,size));
    }





    //包装查询参数
    function buildQuery(page,size) {
        var query = {};
        query.page = typeof page == "undefined" ? 1 : page;
        query.size = size == '' ? 5 :size;

        return query;
    }
    function buildQuer(page,size) {
        var query = {};
        query.page =  page == '' ? 1 : page;
        query.size = size == '' ? 5 :size;
        return query;
    }





</script>

</body>
</html>
